<template>
  <div class="home-page">
    <!-- 欢迎横幅 -->
    <div class="welcome-banner">
      <div class="banner-content">
        <h1 class="banner-title">医学影像查看器</h1>
        <p class="banner-subtitle">专业的DICOM和NII格式医学影像处理平台</p>
        <div class="banner-stats">
          <div class="stat-item">
            <span class="stat-number">10</span>
            <span class="stat-label">功能模块</span>
          </div>
          <div class="stat-item">
            <span class="stat-number">2</span>
            <span class="stat-label">文件格式</span>
          </div>
          <div class="stat-item">
            <span class="stat-number">100%</span>
            <span class="stat-label">本地处理</span>
          </div>
        </div>
      </div>
    </div>

    <!-- 功能卡片网格 -->
    <div class="features-section">
      <div class="section-title">核心功能</div>
      <div class="features-grid">
        <!-- DICOM静态加载 -->
        <div class="feature-card" @click="$router.push('/dicom-static')">
          <div class="card-icon">
            <i class="material-icons">image</i>
          </div>
          <h3 class="card-title">静态DICOM加载</h3>
          <p class="card-description">加载单个DICOM文件进行查看和分析</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- DICOM文件夹加载 -->
        <div class="feature-card" @click="$router.push('/dicom-folder')">
          <div class="card-icon">
            <i class="material-icons">folder</i>
          </div>
          <h3 class="card-title">DICOM文件夹加载</h3>
          <p class="card-description">批量加载DICOM序列文件进行序列分析</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- DICOM压缩包加载 -->
        <div class="feature-card" @click="$router.push('/dicom-zip')">
          <div class="card-icon">
            <i class="material-icons">archive</i>
          </div>
          <h3 class="card-title">DICOM压缩包加载</h3>
          <p class="card-description">解压并加载压缩包中的DICOM文件</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- NII加载 -->
        <div class="feature-card" @click="$router.push('/nii-loader')">
          <div class="card-icon">
            <i class="material-icons">psychology</i>
          </div>
          <h3 class="card-title">NII文件加载</h3>
          <p class="card-description">加载和查看NIfTI格式的神经影像数据</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- DICOM+NII组合 -->
        <div class="feature-card" @click="$router.push('/dicom-nii-combo')">
          <div class="card-icon">
            <i class="material-icons">layers</i>
          </div>
          <h3 class="card-title">多模态融合</h3>
          <p class="card-description">DICOM和NII多模态影像融合显示</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- 格式校验 -->
        <div class="feature-card" @click="$router.push('/format-validation')">
          <div class="card-icon">
            <i class="material-icons">verified</i>
          </div>
          <h3 class="card-title">格式校验</h3>
          <p class="card-description">验证医学影像文件格式的完整性</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- 动态序列 -->
        <div class="feature-card" @click="$router.push('/dicom-dynamic')">
          <div class="card-icon">
            <i class="material-icons">play_circle</i>
          </div>
          <h3 class="card-title">动态序列显示</h3>
          <p class="card-description">动态播放DICOM序列影像</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- 三期对比 -->
        <div class="feature-card" @click="$router.push('/dicom-3phase')">
          <div class="card-icon">
            <i class="material-icons">view_carousel</i>
          </div>
          <h3 class="card-title">三期对比</h3>
          <p class="card-description">同时显示多期影像进行对比分析</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- Volume渲染 -->
        <div class="feature-card" @click="$router.push('/dicom-volume')">
          <div class="card-icon">
            <i class="material-icons">view_in_ar</i>
          </div>
          <h3 class="card-title">Volume 3D渲染</h3>
          <p class="card-description">三维体积渲染和MPR重建</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>

        <!-- 集成查看器 - 新增 -->
        <div class="feature-card featured" @click="$router.push('/integrated-viewer')">
          <div class="card-badge">新功能</div>
          <div class="card-icon">
            <i class="material-icons">dashboard</i>
          </div>
          <h3 class="card-title">集成查看器</h3>
          <p class="card-description">完整的医学影像查看和分析平台，集成工具栏、标注管理、DICOMweb等功能</p>
          <div class="card-action">
            <span>开始使用</span>
            <i class="material-icons">arrow_forward</i>
          </div>
        </div>
      </div>
    </div>

    <!-- 系统特性 -->
    <div class="features-highlight">
      <div class="section-title">系统特性</div>
      <div class="highlight-grid">
        <div class="highlight-item">
          <i class="material-icons">speed</i>
          <h4>高性能渲染</h4>
          <p>基于WebGL的高性能医学影像渲染引擎</p>
        </div>
        <div class="highlight-item">
          <i class="material-icons">security</i>
          <h4>数据安全</h4>
          <p>所有数据在本地处理，确保患者隐私安全</p>
        </div>
        <div class="highlight-item">
          <i class="material-icons">cloud_off</i>
          <h4>本地处理</h4>
          <p>无需上传到服务器，完全离线工作</p>
        </div>
        <div class="highlight-item">
          <i class="material-icons">medical_services</i>
          <h4>医学标准</h4>
          <p>完全符合DICOM和NIfTI医学影像标准</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 首页不需要特殊的逻辑
</script>

<style scoped>
/* 小米风格首页 */
.home-page {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin: 0;
  padding: 0;
}

/* 欢迎横幅 */
.welcome-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  width: 100%;
  margin: 0;
}

.banner-content {
  width: 100%;
  margin: 0 auto;
}

.banner-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.banner-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.banner-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* 功能区域 */
.features-section {
  padding: 40px 16px;
  width: 100%;
  margin: 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* 功能卡片 */
.feature-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

/* 特色卡片 */
.feature-card.featured {
  border: 2px solid #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.feature-card.featured:hover {
  border-color: #667eea;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

/* 徽章 */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.card-icon .material-icons {
  color: white;
  font-size: 32px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.card-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #667eea;
  font-weight: 500;
}

.card-action .material-icons {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.feature-card:hover .card-action .material-icons {
  transform: translateX(4px);
}

/* 系统特性 */
.features-highlight {
  background: white;
  padding: 40px 16px;
  width: 100%;
  margin: 0;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.highlight-item {
  text-align: center;
  padding: 16px;
}

.highlight-item .material-icons {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 16px;
}

.highlight-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.highlight-item p {
  color: #666;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .banner-title {
    font-size: 2rem;
  }
  
  .banner-subtitle {
    font-size: 1rem;
  }
  
  .banner-stats {
    gap: 30px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .features-section,
  .features-highlight {
    padding: 30px 2%;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .highlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .features-grid {
    gap: 12px;
  }
  
  .highlight-grid {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .welcome-banner {
    padding: 40px 1%;
  }
  
  .banner-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .features-section,
  .features-highlight {
    padding: 20px 1%;
  }
  
  .feature-card {
    padding: 16px;
  }
  
  .features-grid {
    gap: 8px;
  }
  
  .highlight-grid {
    gap: 12px;
  }
  
  .highlight-item {
    padding: 12px;
  }
}
</style>

